package org.uugu.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * News entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "news", catalog = "school")
public class News implements java.io.Serializable {

	// Fields
 
	private Integer newsId;
	private String newsName;
	private String newsType;
	private String newsText;
	private Date newsDate;
	private Integer newsHot;
	private Integer newsItem;

	// Constructors
 
	/** default constructor */
	public News() {
	}

	/** minimal constructor */
	public News(String newsName, String newsType, Integer newsHot,
			Integer newsItem) {
		this.newsName = newsName;
		this.newsType = newsType;
		this.newsHot = newsHot;
		this.newsItem = newsItem;
	}

	/** full constructor */
	public News(String newsName, String newsType, String newsText,
			Date newsDate, Integer newsHot, Integer newsItem) {
		this.newsName = newsName;
		this.newsType = newsType;
		this.newsText = newsText;
		this.newsDate = newsDate;
		this.newsHot = newsHot;
		this.newsItem = newsItem;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "news_id", unique = true, nullable = false)
	public Integer getNewsId() {
		return this.newsId;
	}

	public void setNewsId(Integer newsId) {
		this.newsId = newsId;
	}

	@Column(name = "news_name", nullable = false)
	public String getNewsName() {
		return this.newsName;
	}

	public void setNewsName(String newsName) {
		this.newsName = newsName;
	}

	@Column(name = "news_type", nullable = false, length = 20)
	public String getNewsType() {
		return this.newsType;
	}

	public void setNewsType(String newsType) {
		this.newsType = newsType;
	}

	@Column(name = "news_text", length = 65535)
	public String getNewsText() {
		return this.newsText;
	}

	public void setNewsText(String newsText) {
		this.newsText = newsText;
	}

	@Column(name = "news_date", length = 19)
	public Date getNewsDate() {
		return this.newsDate;
	}

	public void setNewsDate(Date newsDate) {
		this.newsDate = newsDate;
	}

	@Column(name = "news_hot", nullable = false)
	public Integer getNewsHot() {
		return this.newsHot;
	}

	public void setNewsHot(Integer newsHot) {
		this.newsHot = newsHot;
	}

	@Column(name = "news_item", nullable = false)
	public Integer getNewsItem() {
		return this.newsItem;
	}

	public void setNewsItem(Integer newsItem) {
		this.newsItem = newsItem;
	}

}